/* 系统概览页面样式 */
.dashboard-overview {
    padding: 25px;
}

/* 统计卡片行 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 统计卡片样式 */
.stat-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3498db, #2980b9);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(180deg, #27ae60, #229954);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(180deg, #f39c12, #e67e22);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(180deg, #e74c3c, #c0392b);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.stat-icon {
    font-size: 28px;
    color: #3498db;
    opacity: 0.8;
}

.stat-card:nth-child(1) .stat-icon {
    color: #3498db;
}

.stat-card:nth-child(2) .stat-icon {
    color: #27ae60;
}

.stat-card:nth-child(3) .stat-icon {
    color: #f39c12;
}

.stat-card:nth-child(4) .stat-icon {
    color: #e74c3c;
}

.stat-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin: 0;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.2;
}

.stat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.trend {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.positive {
    color: #27ae60;
}

.trend.negative {
    color: #e74c3c;
}

.stat-footer span:last-child {
    color: #999;
}

/* 图表行 */
.charts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* 图表卡片样式 */
.chart-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.chart-container {
    padding: 20px;
    height: 300px;
}

.chart-container canvas {
    max-height: 100%;
}

/* 表格行 */
.tables-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* 表格卡片样式 */
.table-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.table-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.table-container {
    padding: 0 20px 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* 系统状态面板 */
.system-status-panel {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.status-item:hover {
    background-color: #e9ecef;
}

.status-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.status-value {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-value i {
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .charts-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-row .chart-card:last-child {
        grid-column: span 2;
    }
    
    .tables-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tables-row .table-card:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .charts-row .chart-card,
    .charts-row .chart-card:last-child {
        grid-column: span 1;
    }
    
    .tables-row {
        grid-template-columns: 1fr;
    }
    
    .tables-row .table-card,
    .tables-row .table-card:last-child {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .dashboard-overview {
        padding: 15px;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .chart-container {
        height: 250px;
        padding: 15px;
    }
    
    .system-status-panel {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .table-container {
        max-height: 350px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .dashboard-overview {
        padding: 10px;
    }
    
    .stat-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

.stat-card {
    animation: slideInUp 0.5s ease-out;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

.chart-card,
.table-card {
    animation: slideInUp 0.6s ease-out;
}

.chart-card:nth-child(1) {
    animation-delay: 0.5s;
}

.chart-card:nth-child(2) {
    animation-delay: 0.6s;
}

.table-card:nth-child(1) {
    animation-delay: 0.7s;
}

.table-card:nth-child(2) {
    animation-delay: 0.8s;
}

.table-card:nth-child(3) {
    animation-delay: 0.9s;
}

/* 悬停效果增强 */
.stat-card:hover .stat-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* 加载状态 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* 数据为空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
}

/* 图表提示样式 */
.chart-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    position: absolute;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 高亮效果 */
.highlight {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

/* 进度条样式 */
.progress-bar {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.stat-card:nth-child(1) .progress-fill {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.stat-card:nth-child(2) .progress-fill {
    background: linear-gradient(90deg, #27ae60, #229954);
}

.stat-card:nth-child(3) .progress-fill {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.stat-card:nth-child(4) .progress-fill {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .stat-card,
    .chart-card,
    .table-card {
        background-color: #2c3e50;
        color: #ecf0f1;
    }
    
    .stat-value {
        color: #ffffff;
    }
    
    .status-item {
        background-color: #34495e;
    }
    
    .status-item:hover {
        background-color: #3e5569;
    }
    
    .data-table th {
        background-color: #34495e;
        color: #ecf0f1;
    }
    
    .data-table tbody tr:hover {
        background-color: #34495e;
    }
}